package com.keepsport.keepsportapi.controller;

import com.keepsport.keepsportapi.dto.MallTypeDto;
import com.keepsport.keepsportapi.service.intf.MallService;
import com.keepsport.keepsportapi.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * __▁▂▃▁__ ﹀ 　　 落霞与孤骛齐飞
 * 　　﹀ _▁▂▃__ 　　 秋水共长天一色
 * 　　__▁▂▁___ ﹀ ﹋ ●
 * 　　﹋ ﹀
 * 　　█▆▅▇▆▅▄▃▄▅▆▄▅▄▃▂▃▄▆▅▇▆▄▅█
 * 　　-__~~--___-▔~~__--__~~~_----__----~~~-
 *
 * @author 1212
 * @create 2022-07-01 20:02
 */
@Api(tags = "商城相关")
@CrossOrigin
@RestController
@RequestMapping("/api/mall/")
public class MallController {
    @Resource
    private MallService service;
    //类型查询
    @ApiOperation("查询")
    @GetMapping("mall.do")
    public R select(int id) {
        return service.selectByType(id);
    }
    @ApiOperation("查询所有")
    @GetMapping("mallall.do")
    public R selectAll() {
        return service.selectAll();
    }
   //搜索
    @ApiOperation("模糊查询")
    @GetMapping("like.do")
    public R selectLike(String name){return  service.selectLike0(name);}
}
